import {EventName} from "@/event/event.ts";
import {GlobalMessageEventHandler} from "@/event/eventglobalmessage.ts";

const eventMap = new Map()//导航栏标签事件页面中处理
eventMap.set(EventName.GLOBAL_MESSAGE, new GlobalMessageEventHandler())

export function eventHandlerCenter(name: EventName, param: any) {

    const eventHandler = eventMap.get(name)
    if (eventHandler) {
        eventHandler.handler(name, param)
    }
}